﻿#include "Performer.h"

Performer::Performer(const QString &name, const VPoint &site, const Shape &shape)
{
    qDebug() << "perf";
    this->_nickname = new QString(name);
    this->_site = new VPoint(site);
    this->_shape = new Shape(shape);
    this->_paint = new Paint(name, this->_shape->getPoints(), this->_shape->getRadius());
    this->_performer = this;
    //由于performer本身为虚函数,_type由子函数构造
}

Performer::~Performer()
{
    qDebug() << "perfa";
    delete this->_type;
    delete this->_nickname;
    delete this->_site;
    delete this->_shape;
    delete this->_paint;
}

const VPoint & Performer::getSite() const
{
    return *this->_site;
}

const Shape & Performer::getShape() const
{
    return *this->_shape;
}

const Paint & Performer::getPaint() const
{
    return *this->_paint;
}

const QString & Performer::getType() const
{
    return *this->_type;
}
